/*******************************************************************************
* Project: QSAR(Cute Software Architecture) 
*
* Copyright: Copyright(C) 2024 by YuetingBen, All Rights Reserved
*
* File name: Rtos.c
*
* Brief: ;
*
* Author: Yueting.Ben
*
* Module: RTOS
*
*******************************************************************************/


/** HEADER FILES **/
#include "Rtos.h"


/** TYPEDEF DEFINITION **/


/** MACRO DEFINITION **/


/** GLOBAL DATA DEFINITION **/
void RTOS_CyclicTask_1ms(void *argument);
void RTOS_CyclicTask_10ms(void *argument);

/** LOCAL DATA DEFINITION **/


/** LOCAL FUNCTION DECLARATION **/


/** GLOBAL FUNCTION DECLARATION **/


/** LOCAL FUNCTION **/


/** GLOBAL FUNCTION **/
void RTOS_CyclicTask_1ms(void *argument)
{
    Dcm_Init();
    for(;;)
    {
        CAN_Runnable_1ms();
        Com_MainFunctionTx();
        Com_MainFunctionRx();
        CanTp_MainFunction();
        DcmDsl_MainFunction();
        AppCom_MainFunction();
        AppTest_MainFunction();
        osDelay(1);
    }
}


void RTOS_CyclicTask_10ms(void *argument)
{
    NvM_Init((const NvM_ConfigType*)&NvMConfig);
    Dem_Init((const Dem_ConfigType*)&Dem_Config);
    
    for(;;)
    {
        Dem_MainFunction();
        NvM_MainFunction();
        osDelay(10);
    }
}